<?php
declare (strict_types=1);

namespace app\callback\controller;

use app\admin\model\base\User;
use app\admin\model\base\UserOfficial;
use app\admin\model\base\UserSubscribeLog;
use app\BaseController;
use app\Request;
use platform\LvBaoPlatform;
use think\facade\Log;

/**
 * 零塑平台
 */
class LinSu extends BaseController
{

    /**
     * 接收回调信息
     * @param Request $request
     */
    public function LinSuAfterNotify(Request $request): string
    {
        $post_data = file_get_contents("php://input");
        Log::write($post_data);
        if (!$post_data) {
            $post_data = $request->all();
        }
        $post_data = is_array($post_data) ? $post_data : json_decode($post_data, true);
        UserSubscribeLog::oneLogSave(0,$post_data['appId'],1,$post_data['openId'],9);
        return 'success';
    }


}
